#ifndef APPLYCERTIFICATEMODULE_H
#define APPLYCERTIFICATEMODULE_H

#include "ModuleInterface.h"
#include "utils/eccoperator.h"

#include <utils/certificateManager.h>

#define CertManger CertificateManager::instance()
class applyCertificateModule : public ModuleInterface
{
public:
    applyCertificateModule();
    bool initialize() override;
    QByteArray execute() override;
    bool handleReceiveData(const QByteArray &receiveData) override;

private:
    std::shared_ptr<BIGNUM> BN_priKey;
    std::shared_ptr<EC_POINT> ECPOINT_pubKey;
    std::shared_ptr<EVP_PKEY> EVP_pairKey;
    std::shared_ptr<EVP_PKEY> EVP_priKey;
    std::shared_ptr<EVP_PKEY> EVP_pubKey;
    std::shared_ptr<EVP_PKEY> EVP_CA_pubKey;
    ECCOperator m_ecc;
};

#endif // APPLYCERTIFICATEMODULE_H
